home *** CD-ROM | disk | FTP | other *** search
-
-
-
- util C Library Procedures util
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Util_CanonicalDir - Canonicalize a directory name to a full
- path.
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<uuttiill..hh>>
-
- char *
- UUttiill__CCaannoonniiccaallDDiirr(_n_e_w_D_i_r, _c_u_r_r_e_n_t_D_i_r, _b_u_f_f_e_r)
-
- AARRGGUUMMEENNTTSS
- char *_n_e_w_D_i_r (in) The new directory name
- to canonicalize.
-
- char *_c_u_r_r_e_n_t_D_i_r (in) The current directory
- (or other name) to
- which _n_e_w_D_i_r _i_s _r_e_l_a_-
- _t_i_v_e - _m_a_y _b_e _N_U_L_L.
-
- _c_h_a_r *_b_u_f_f_e_r (_i_n/_o_u_t) Pre-allocated space in
- which to put new
- canonicalized name -
- may be NULL.
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- The procedure takes a directory name, _n_e_w_D_i_r, and turns it
- into a full path relative to a directory _c_u_r_r_e_n_t_D_i_r. The
- parameter _c_u_r_r_e_n_t_D_i_r can actually be any full pathname to a
- directory but is usually the current directory. If
- _c_u_r_r_e_n_t_D_i_r is NULL, the procedure calls _g_e_t_w_d() to find the
- full path name to the current directory. If the parameter
- _b_u_f_f_e_r is NULL, then the procedure allocates space for the
- new canonicalized directory name and returns a pointer to
- that new string. If _b_u_f_f_e_r is not NULL, then it must be an
- area of at least MAXPATHLEN characters in which the pro-
- cedure will copy the computed canonicalized name. A pointer
- to _b_u_f_f_e_r is then returned. It is okay for _b_u_f_f_e_r and
- _n_e_w_D_i_r to be the same physical string, since _n_e_w_D_i_r is only
- overwritten at the end of the computation.
-
- The procedure returns a pointer to a new full pathname if
- successful. If there is a failure, it returns NULL, with an
- error string in _b_u_f_f_e_r if that parameter was non-NULL.
-
-
- KKEEYYWWOORRDDSS
- directory, path, pathname, full
-
-
-
-
-
- Sprite v.1.0 Printed: November 15, 1991 1
-
-
-
-